package builders;

import books.Author;

/**
 * Author builder.
 */
public class AuthorBuilder implements IBuilderExampler<Author> {

    private String name;

    public AuthorBuilder withName(final String aName) {
        this.name = aName;
        return this;
    }

    @Override
    public Author build() {
        return new Author(this);
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    @Override
    public Author example() {
        return new AuthorBuilder().withName("Author example").build();
    }

}
